import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from "path";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],

  // configureWebpack: {
  //   resolve: {
  //     alias: {
  //       vue$: 'vue/dist/vue.esm-bundler.js',
  //     },
  //   },
  // }

  server: {
    host: '0.0.0.0',
    port: 8010,
    open: true,
    proxy: {
      "/api": {
        target: "http://localhost:3001",
        changeOrigin: true
      }
    }
  },

  resolve: {
    alias: [
      { find: /^@\//, replacement: path.join(__dirname, './src/') }
    ]
  },
})
